package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.product.entity.BaseCategory1;
import com.atguigu.gmall.product.entity.CategoryViewEntity;
import com.atguigu.gmall.web.CategoryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author 李天玉
* @description 针对表【base_category1(一级分类表)】的数据库操作Mapper
* @createDate 2025-08-15 14:26:50
* @Entity com.atguigu.gmall.product.entity.BaseCategory1
*/
public interface BaseCategory1Mapper extends BaseMapper<BaseCategory1> {

    /**
     * 数据库查询所有分类，封装成一个嵌套的树形结构
     * @return
     */
    List<CategoryVo> getCategorysTree();

    /**
     * 根据sku的三级分类id，查询分类完整路径信息
     * @param category3Id
     * @return
     */
    CategoryViewEntity getCategoryView(Long category3Id);
}




